<?php

use Illuminate\Database\Seeder;

class AdminTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        //删除数据
        DB::table('admins')->delete();
        //填充数据
        App\Models\Admin::create([
            'id' => 1,
            'account_number' => 'admin',
            'password' => bcrypt('123456'),
            'last_login_time' => time(),
            'last_login_ip' => ip2long('127.0.0.1'),
            'login_count' => 0,
            'active' => 1,
            'create_time' => time(),
            'update_time' => time(),
        ]);
    }
}
